import yaml
from pymongo import MongoClient
mongo_server='10.1.40.200'
cmd="db.getCollection('interface_case').find({},{'case_env':1,'project_id':1,'interface_id':1,'casename':1,'req_body_other':1,'req_params':1,'req_headers':1,'req_query':1,'req_body_form':1,'test_res_body':1,'test_res_header':1})"


# base_url = "{}//{}{}/store/openapi/v2".format(pre_url, server_ip, port)
# client = MongoClient("mongodb://{}@{}:27017".format('admin', '10.1.40.200'))

client = MongoClient("mongodb://{}:27017".format(mongo_server ))
dblist = client.list_database_names()
print(dblist)